using System.Linq;
using NUnit.Framework;

namespace Solver
{
	/// <summary>
	/// Finding the nth digit of the fractional part of the irrational number.
	/// </summary>
	public class Problem040 : SelfChecker, IProblem
	{
		public int Id
		{
			get { return 40; }
		}

		public string Solve()
		{
			var digits = new[] {1, 1, 5, 3, 7, 2, 1};
			var product = digits.Aggregate(1, (total, cur) => total * cur);
			return product.ToString();
		}

		[Test]
		public override void Check()
		{
			Assert.AreEqual("210", Solve());
		}
	}
}